class MouseHandler:
    
    handlers = {}
    
    
    @staticmethod
    def register(key, handler):
        if key not in MouseHandler.handlers:
            MouseHandler.handlers[key] = []
        MouseHandler.handlers[key].append(handler)
        
    @staticmethod
    def handle(key, client):
        if key in MouseHandler.handlers:
            for handler in MouseHandler.handlers[key]:
                handler.handle(client)
    
    @staticmethod    
    def handleUp(key, client):
        if key in MouseHandler.handlers:
            for handler in MouseHandler.handlers[key]:
                handler.handleUp(client)
                
    @staticmethod    
    def handleWheelUp(client):
        if 4 in MouseHandler.handlers:
            for handler in MouseHandler.handlers[4]:
                handler.handleWheelUp(client)
                
    @staticmethod    
    def handleWheelDown(client):
        if 5 in MouseHandler.handlers:
            for handler in MouseHandler.handlers[5]:
                handler.handleWheelDown(client)         
            